//setList
function setList(list){
	zeai.listEach(zeai.tag(list,'li'),function(li){setList_li(li)});
}
//分页
function waterfall_load(mainobj,e){
	var div = zeai.addtag('div');div.id='p'+p;div.append(e),newlist = zeai.tag(div,'li');
	mainobj.append(div);
	zeai.listEach(newlist,function(obj){
		obj.addClass('alpha0_100');
		setList_li(obj);
	});
}
function setList_li(li){
	var id=li.getAttribute("id");
	var dt=li.getElementsByTagName("dt")[0];
	var agree=dt.nextElementSibling;
	agree.onclick = function (){
		var self=this;
		zeai.ajax({url:MHOST+'/video'+zeai.extname,js:1,data:{submitok:'ajax_agree',fid:self.getAttribute("vid")}},function(e){rs=zeai.jsoneval(e);
			if(rs.flag==1){
				if(!self.hasClass('ed')){
					self.addClass('ed');
					var font=self.lastChild;
					font.html(parseInt(font.innerHTML)+1);
					zeai.msg(rs.msg);
				}
			}
		});
	}
}

function uA(uid){zeai.openurl(MHOST+'/u.php?uid='+uid)}

function waterfall(mainobj){
	zeai.listEach(zeai.tag(mainobj,'li'),function(li){
		setList_li(li);
	});
}
function init(){waterfall(o('ZEAI_list'));}
function video_so_btnFn(){ZeaiM.div_left({obj:video_so,w:28});}

function zeaiOnscrollv(){
	var tt = zeai.getScrollTop(),cH= parseInt(document.documentElement.clientHeight),sH= parseInt(document.body.scrollHeight);//cH=document.documentElement.clientHeight;
	if ((sH-tt-cH) <100){if (p > ZEAI_totalP){return false;}else{Object.assign(zeaiOnscroll_json.data,{p:p});zeai.ajax(zeaiOnscroll_json,function(e){if (e == 'end'){zeai.msg(0);return false;}else{ZEAI_list.append(e);p++;setList(o('ZEAI_list'));}});}}
	backtopFn();
}
